<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    @include('public.h5_head')
    <title>控区管理</title>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/rem.js"></script>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/commoncss/common.css"/>
    <style>
        #areas_box{width:100%;height:100%;display:flex;flex-flow:column;}
        .wrap{flex:1;overflow:hidden;background:#f1f1f1;}
        .areas{width:100%;height:auto;}
        .areas_content{width:92%;margin:0.64rem 4%;height:auto;color:#383838;}
        .tab{border-collapse:collapse;width:100%;height:100%;font-size:0.64rem;color:#383838;font-size:0.64rem;margin-bottom:1rem;}
        .tab td{text-align:center;}
        table,th,td{border:1px solid #ccc;}
        .areas_bottom{width:100%;height:1rem;}
    </style>
</head>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/app.js"></script>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/iscroll.js"></script>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/common.js"></script>
<body>
    <div id="areas_box">
        <div class="wrap">
            <div class="areas">
                <div class="areas_content">
                    <table class="tab" border="1" cellspacing="0" cellpadding="0" bgcolor="">
                        <tr style="height:2rem;"><th colspan="3" rowspan="1">控区列表</th></tr>
                        <tr style="height:2rem;"><td>品牌</td><td>代理商</td><td>所有区</td></tr>
                        @foreach($brand_area as $key => $value)
                            <tr>
                                <td>{{$key}}</td>
                                <td>
                                    @if(empty($value[0]))
                                        <p>暂无代理商</p >
                                    @else
                                        @foreach($value as $val)
                                            <div>
                                                <span>{{$val['area_name']}}</span>
                                                <span>({{$val['username']}})</span>
                                            </div>
                                        @endforeach
                                    @endif
                                </td>
                                <td>
                                    @foreach($user_distinct as $value)
                                        <p>{{$value->area_name}}({{$value->num}})</p>
                                    @endforeach
                                </td>
                            </tr>
                        @endforeach
                    </table>
                </div>
                <div class="areas_bottom"></div>
            </div>
        </div>
    </div>
</body>
<script>
    scroll();
</script>
</html>